package com.kakame.codenews.front.menu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.kakame.codenews.base.constant.SystemConstant;
import com.kakame.codenews.base.web.annotation.CacheOperate;
import com.kakame.codenews.base.web.enumeration.CacheOperateType;
import com.kakame.codenews.base.web.fast.mapping.common.Menu;
import com.kakame.codenews.front.menu.dao.FrontMenuDao;
import com.kakame.codenews.front.menu.service.FrontMenuService;

@Service
public class FrontMenuServiceImpl implements FrontMenuService {

    @Resource
    private FrontMenuDao menuDao;

//    @CacheOperate(operateType = CacheOperateType.DELETE_ALL)
    @CacheOperate(operateType = CacheOperateType.GET, returnType = List.class)
    @Override
    public List<Menu> listExistSiteHeaderMenu() {
        return menuDao.list(Menu.create().status(SystemConstant.DATA_STATUS_C).menuType("SITE_HEADER_MENU").build());
    }

}
